<template>
  <div id="app">
      <p class="news-title">{{info.title}}</p>
      <p class="news-time">发布时间：{{info.time}}</p>
      <div class="cont">
        <div v-html="info.content"></div>
      </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
      info:[],
      id:'',


    }
  },
  components: {
  },
  created:function () {
      this.$emit('footer', false);
  },

  mounted () {
    this.id = this.$route.query.id;
    this.recordapi();
  },
  	methods: {

      recordapi(){
          var that = this;
          var userid = that.$cookieStore.getCookie('userid');
          that.$api.post("/Index/newscont",{'id':that.id}).then(res => {
            console.log(res);
            that.info = res.info;

          });
      },
    }
}
</script>
